/*
 * complex.h
 *
 *  Created on: Sep 16, 2013
 *      Author: andrewts
 */

#ifndef COMPLEX_H_
#define COMPLEX_H_
class Complex
{
	static double zero;
public:
	double real, imag;

	Complex();
	Complex(double r);
	Complex(double r, double i);
	Complex(const Complex &z);

	Complex sqrt(Complex);

	Complex operator + (Complex);
	Complex operator - (Complex);
	Complex operator * (Complex);
	Complex operator / (Complex);

	void operator += (Complex);
	Complex& operator -= (Complex);
	Complex& operator *= (Complex);
	Complex& operator /= (Complex);
	Complex& operator = (const Complex &);
};

int test_class_Complex(void);

std::ostream & operator <<(std::ostream &, Complex);
#endif /* COMPLEX_H_ */
